﻿@using sBlog.Net.Models
@using sBlog.Net.Models.Comments
@using sBlog.Net.Domain.Entities
@model ViewPostOrPageModel
@{
    Layout = "~/Themes/Mlog/_Layout.cshtml";
    ViewBag.Title = string.Format("{0}", Model.Post.PostTitle);
}
<script type="text/javascript">
    $(window).scroll(function () {
        if ($(this).scrollTop() > 100) {
            $('.scrollupViewContent').fadeIn();
        } else {
            $('.scrollupViewContent').fadeOut();
        }
    });

    $('.scrollupViewContent').click(function () {
        $("html, body").animate({ scrollTop: 0 }, 600);
        return false;
    });

    $(document).ready(function () {

        $(window).scroll(function () {
            if ($(this).scrollTop() > 100) {
                $('.scrollupViewContent').fadeIn();
            } else {
                $('.scrollupViewContent').fadeOut();
            }
        });

        $('.scrollupViewContent').click(function () {
            $("html, body").animate({ scrollTop: 0 }, 600);
            return false;
        });

    });
</script>
<div class="viewContent">
    <br />
    <br />
    @if (Model.UserCanEdit)
    {
        <div style="float: right; margin-top: 8px;">
            @Html.ActionLink("edit", "Edit", "Post", new { Area = "Admin", postID = Model.Post.PostID }, new { @class = "editLink" })
        </div>
    }
    @Html.Partial("Post", new PostModel { Post = Model.Post, DisqusEnabled = Model.DisqusEnabled, RootUrl = Model.DisqusUrl })
    <br />
    <div class="clear">
    </div>
</div>
<a href="#" class="scrollupViewContent"></a>
<div class="clear">
</div>
